// 引入mongoose第三方模块
const mongoose = require('mongoose');
// const baseURL = '127.0.0.1:12534'
const baseURL = 'mini-cloud.top:12534'
const mongoDBUser = 'admin:woaini1314..'
const normalUser = 'normal:normal'
// 连接数据库
mongoose.connect('mongodb://' + mongoDBUser + '@'+ baseURL +'/supermarket', { useNewUrlParser: true, useUnifiedTopology: true })
        .then(() => {
          console.log('数据库连接成功');
        })
        .catch((err) => {
          console.log('数据库连接失败', err);
        })